<template>
  <div class="layout">
    <router-view v-slot="{ Component }">
      <keep-alive>
        <component :is="Component"></component>
      </keep-alive>
    </router-view>
    <van-tabbar route>
      <van-tabbar-item to="/">首页</van-tabbar-item>
      <van-tabbar-item to="/mine">我的</van-tabbar-item>
      <van-tabbar-item to="/profile">个人中心</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { Tabbar, TabbarItem } from 'vant'

export default defineComponent({
  // setup () {

  // }
  components: {
    'van-tabbar': Tabbar,
    'van-tabbar-item': TabbarItem
  }
})
</script>

<style lang="scss">
#app {
  width: 100vw;
  height: 100vh;
  .layout {
    width: 100%;
    height: 100%;
  }
}
</style>
